<?php
/**
 * @Description 
 * 
 * @Sonkwl Xiong
 * @Date 2023/03/22 09:37:23
 * @GET 
 * 
 * @POST 
 * 
 * @Response 
 *  
 */
include '../autoload.php';

use \Sonkwl\UsePHP\jwter;
use \Sonkwl\UsePHP\mysqler;


mysqler::Set("user","whhr");
mysqler::Set("pwd","ADMINwhhr123");
mysqler::Set("host","10.202.8.204");
mysqler::Set("dbname","xczx");

jwter::Set("version","V1");
jwter::Set("exp",strtotime("+4 hours"));
jwter::Set("user_table","wh_user_t");
jwter::Set("user_id","s_no");
jwter::Set("user_name","s_name");

$token=jwter::SetToken("F6987445");

echo $token.'<br>';

$admin=jwter::Validate($token,1,254);//后面两个参数不为0,必须定义mysql参数

print_r($admin);
?>